package com.niguang.work.labour.common.util;

public class BinSysUtil {


    /**
     * 16进制转10进制
     *
     * @return
     */
    public static String toBinary10(String binary) {
        Integer x;
        if (binary.contains("0x")) {
            x = Integer.parseInt(binary.substring(2), 16);//从第2个字符开始截取
        } else {
            x = Integer.parseInt(binary, 16);
        }
        return x.toString();
    }

    public static void main(String[] args) {
        String str = "7990EA24";

        System.out.println(toBinary10(str));

    }
}
